#!/bin/bash -e

function info() {
echo Usage: `basename $0` repo_path
echo should create a repo in github
exit 65
}

while getopts  ":b:p:" opts
do
        case  $opts  in
		b) build=$OPTARG;;
		p) out_prefix=$OPTARG;;
		*) info;;
        esac
done
shift $(($OPTIND - 1))


if [ $# -lt 1 ]; then info; fi

if test -d $1; then
cd $1
else
mkdir $1
cd $1
fi

repo=`basename \`pwd\``
echo repo: $repo

echo "# $repo" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:yingnn/$repo.git
git push -u origin master

exit 0